<?php


// form_buttons
echo '<div class="form_buttons">';

// form_button_save
echo '<div class="form_button form_button_save">' . $routine->buttonSubmit('accept', __('save_action', TRUE)) . '</div>';

// form_button_save_close
echo '<div class="form_button form_button_save_close">' . $routine->buttonSubmitClose(array('accept', 'arrow_up'), __('save_close_action', TRUE)) . '</div>';
if (isset($has_rubric) && $has_rubric) {
	// form_button_save_close
	echo '<div class="form_button form_button_save_close_2">' . $routine->buttonSubmitClose2(array('accept', 'arrow_up', 'find'), __('save_close_2_action', TRUE)) . '</div>';
}

// form_button_back
if (isset($has_rubric) && $has_rubric) {
	$back_url = array('action' => 'back', 'id' => $id, 'autoPage' => TRUE);
	echo '<div class="form_button form_button_back">' . $routine->button('arrow_up', FALSE, $back_url, array('title' => __('index_action', TRUE))) . '</div>';
	$back_url = array('action' => 'back', 'autoPage' => TRUE);
	echo '<div class="form_button form_button_back">' . $routine->button(array('arrow_up', 'find'), FALSE, $back_url, array('title' => __('all_index_action', TRUE))) . '</div>';
} else {
	$back_url = array('action' => 'back', 'id' => $id, 'autoPage' => TRUE);
	echo '<div class="form_button form_button_back">' . $routine->button('arrow_up', FALSE, $back_url, array('title' => __('index_action', TRUE))) . '</div>';
}

// form_button_preview
if (is_file(VIEWS . $this->params['controller'] . DS . 'view' . $this->ext)) {
	$preview_url = array('action' => 'view', 'id' => $id, 'admin' => FALSE, 'preview' => TRUE, 'autoPage' => FALSE);
	echo '<div class="form_button form_button_preview">' . $routine->button('zoom', FALSE, $preview_url, array('title' => __('preview_action', TRUE), 'target' => '_preview')) . '</div>';
}

// form_button_delete
if (isset($field_schema['deleted'])) {
	$delete_url = array('action' => 'erase', 'id' => $id, 'autoPage' => TRUE);
} else {
	$delete_url = array('action' => 'delete', 'id' => $id, 'autoPage' => TRUE);
}
echo '<div class="form_button form_button_delete">' . $routine->button('delete', __('delete_action', TRUE), $delete_url, array('confirm' => __('are_you_sure', TRUE))) . '</div>';

echo '</div>'; // end of form_buttons


?>